﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MShop.Core.Domain.Trade>" %>

<asp:Content ID="Contenft1" ContentPlaceHolderID="cphMeta" runat="server">
    <script type="text/javascript">
        history.go(1);
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm())
       { %>
    <div id="content" class="ovfl">
        <div>
            <img src='/images/step2.gif' />
        </div>
        <div class="cart">
            <fieldset>
                <legend>核对订单信息</legend>
                <div>
                    <h2>
                        收货人信息<span><%=Html.ActionLink("返回修改", "ShoppingCartSelect", new { token = Request.Params["token"], tradeid = Request.Params["tradeid"] })%>
                        </span>
                    </h2>
                    <ul class="list">
                        <li>收货人姓名：
                            <%=Model.ReceiverName %>
                        </li>
                        <li>省份：
                            <%=Model.AreaGroup.CurrentAreaName %></li>
                        <li>地址：
                            <%=Model.Location %>
                        </li>
                        <li>邮编：
                            <%=Model.PostCode %>
                        </li>
                        <li>固定电话：<%=Model.Tel %>
                        </li>
                        <li>移动电话：：<%=Model.Mobile %>
                        </li>
                    </ul>
                </div>
                <div>
                    <h2>
                        配送方式<span><%=Html.ActionLink("返回修改", "ShoppingCartSelect", new { token = Request.Params["token"], tradeid = Request.Params["tradeid"] })%>
                        </span>
                    </h2>
                    <ul class="list">
                        <li>配送方式：<%=Model.Distribution.Name %></li>
                        <li>运 费：<%=Model.Distribution.Price %></li>
                        <li>送货时间：<%=Html.DisplayFor(m => m.DeliveryPeriodType, "DeliveryPeriod")%></li>
                    </ul>
                </div>
                <div>
                    <h2>
                        支付方式 <span>
                            <%=Html.ActionLink("返回修改", "ShoppingCartSelect", new { token = Request.Params["token"], tradeid = Request.Params["tradeid"] })%>
                        </span>
                    </h2>
                    <ul class="list">
                        <li>支付方式：
                            <%=Model.Pay.PayName %></li>
                    </ul>
                </div>
                <div style="display: none;">
                    <h2>
                        发票信息
                    </h2>
                    <table>
                        <tr>
                            <td>
                                发票抬头
                            </td>
                            <td>
                                <%=Model.InvoiceName %>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <h2>
                        订单备注
                    </h2>
                    <ul class="list">
                        <li>
                            <%=string.IsNullOrEmpty(Model.BuyerMemo)?"暂时没有备注":Model.BuyerMemo %>
                        </li>
                    </ul>
                </div>
                <div>
                    <h2>
                        商品清单
                    </h2>
                    <% var caritems = ViewData["CartItems"] as IEnumerable<CartItem>; %>
                    <table >
                        <tr>
                            <th>
                                商品编号
                            </th>
                            <th>
                                商品图片
                            </th>
                            <th>
                                商品名称
                            </th>
                            <th>
                                商城价
                            </th>
                            <th>
                                赠送积分
                            </th>
                            <th>
                                商品数量
                            </th>
                        </tr>
                        <% foreach (var item in caritems)
                           { %>
                        <tr>
                            <td>
                                <%=item.ProductId %>
                            </td>
                            <td>
                                <img src='<%=item.Product.ThumbImageUrl %>' class="thumb" />
                            </td>
                            <td>
                                <%=item.ProductName %>
                            </td>
                            <td>
                                <%=item.TotalPrice%>
                            </td>
                            <td>
                                <%=item.Product.Points %>
                            </td>
                            <td>
                                <%=item.Quanitiy %>
                            </td>
                        </tr>
                        <% } %>
                    </table>
                    <div>
                        <h2>
                            结算信息
                        </h2>
                        <ul>
                            <li>商品金额：<span class="price">￥<%=Model.TotalFee%>元</span>
                                + 运费：<span class="price">￥<%=Model.PostFee %>元</span> - 折扣：<span class="price"><%=Model.DisCount %>元</span>  </li>
                            <li>应付总额：<span class="price">￥<%=Model.TotalFee+Model.PostFee%> 元</span> </li>
                            <li>
                                <input type="submit" class="btn_login" value="提交订单" onclick="return confirm('你确认要提交该订单吗？');"  />
                            </li>
                        </ul>
                    </div>
                </div>
            </fieldset>
        </div>
    </div>
    <%} %>
</asp:Content>
